package Day06;

import java.util.Random;

public class Practice {
    public static void main(String[] args) {
        say();
        say("zhangsan");
        say("zhangsan",25);
        sum(3,5);
        int []a=generateArray(10,1000);
        for (int i=0;i<a.length;i++){
            System.out.print(a[i]+" ");
        }
        System.out.println();
        int[]b=generateArray(5,100);
        for (int i=0;i<b.length;i++){
            System.out.print(b[i]+" ");
        }
    }
    public static void say(){
        System.out.println("你好");
    }
    public static void say(String name){
        System.out.println("你好，我叫"+name);
    }
    public static void say(String name,int age){
        System.out.println("你好，我叫"+name+"今年"+age+"岁了");
    }
    public static int sum(int num1,int num2){
        int s=num1+num2;
        return s;
    }
    public static int[]generateArray(int len,int max){
        Random rand=new Random();
        int[]arr=new int[len];
        for (int i=1;i<arr.length;i++){
            arr[i]=rand.nextInt(max+1);
        }
        return arr;
    }
}
